/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
var barra;
var barra_offset;
$(document).on("ready",main);

function main(){
	barra = $("#top");
	barra_offset = barra.offset();
	
	$(window).on("scroll",fijar);
}

function fijar(){
	if($(window).scrollTop() > barra_offset.top){
		barra.addClass("fijo");
	}
	else{
		barra.removeClass("fijo");
	}
}

